/*
 * Copyright 2012 Alan Burlison, alan@bleaklow.com.  All rights reserved.
 * Use is subject to license terms.  See LICENSE.txt for details.
 */

/*
 * Requires and is based in part on example code from:
 *     LUFA Library Copyright (C) Dean Camera, 2012.
 *     dean [at] fourwalledcubicle [dot] com www.lufa-lib.org
 * See License.txt in the LUFA distribution for LUFA license details.
 */

/*
 * LUFA-based CDC-ACM serial port support.  This extends the LUFA implementation
 * by adding basic line disciplie handling - CR/NL handling, echoing, backspace
 * handling etc.
 */

#include "USBSerial.h"

// Create a new USB Serial connection.
USBSerial::USBSerial(uint8_t iomode, FILE **in, FILE **out)
{
    usb_serial_init(iomode, in, out);
}

// Create a new USB Serial connection.
USBSerial::USBSerial(uint8_t iomode)
{
    usb_serial_init_stdio(iomode);
}

// Run the LUFA USB handling code.
bool USBSerial::run(uint32_t now)
{
    return usb_serial_run(now);
}
